home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 422_01 / test2.asm < prev    next >
Encoding:
Assembly Source File  |  1994-03-21  |  445 b   |  16 lines

  1. *
  2. * EMILY test program: Write message to the serial port
  3. *
  4.     ORG    $0800
  5. BEGIN    MOV    DPTR,#MESSAGE    Point to message
  6. WRCHR    CLR    A        Zero ACC
  7.     MOVC    A,[A+DPTR]    Get value from string
  8.     JZ    BEGIN        End of string, repeat
  9.     JNB    SCON.1,*    Wait for TX ready
  10.     MOV    SBUF,A        Write out char
  11.     CLR    SCON.1        Indicte we are sending
  12.     INC    DPTR        Advance pointer
  13.     SJMP    WRCHR        And keep going
  14. MESSAGE    STR    'This is a test of the EMILY serial operation.'
  15.     DB    $0A,$0D,0
  16.